package com.woniuxy.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author: ideaAdmin
 * TODO:
 * Date: 2022/2/14:15:02
 * Description:
 */




@Component

//需要加载配置文件的文件名
//@PropertySource("classpath:myproperties.properties")
public class User {

    @Value("${diy.config.user}")
    private String user;

    @Value("${diy.config.pwd}")
    private String pwd;

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public String toString() {
        return "User{" +
                "user='" + user + '\'' +
                ", pwd='" + pwd + '\'' +
                '}';
    }
}
